#ifndef __UILAYER_H__
#define __UILAYER_H__
#include "cocos2d.h"
#include "gofgame/dungeonkeeper/game/Skill.h"
#include "gofgame/dungeonkeeper/game/Unit.h"
#include "gofgame/dungeonkeeper/game/Icon.h"

using namespace gofgame::dungeonkeeper::game;
using namespace gofgame::dungeonkeeper::game::skill;
using namespace gofgame::dungeonkeeper::game::unit;
using namespace cocos2d;

namespace gofgame {
	namespace dungeonkeeper {
		namespace game {

			class UILayer :public cocos2d::CCLayer {
			public:
				bool init();
	
				CREATE_FUNC(UILayer);

				void onEnter();
				void onExit();

				void initUnitAndSkillIcon();

				bool isCast;
				CCPoint prePoint;
				bool touchBegin;
				int moveVe;
				bool touchMove;
				bool dragSkill;
				CCSprite *dragSprite;
			public :
				virtual bool ccTouchBegan(CCTouch *pTouch, CCEvent *pEvent) ;
				virtual void ccTouchMoved(CCTouch *pTouch, CCEvent *pEvent) ;
				virtual void ccTouchEnded(CCTouch *pTouch, CCEvent *pEvent) ;
				virtual void ccTouchCancelled(CCTouch *pTouch, CCEvent *pEvent) ;
			public :
				CCSprite *unit1;
				CCSprite *unit2;
				CCSprite *unit3;
				CCSprite *unit4;
				CCSprite *unit5;
				CCSprite *unit6;
				CCSprite *unit7;
				CCSprite *skill1;
				CCSprite *skill2;
				CCSprite *skill3;
				CCSprite *skill4;
				Icon *tIcon;
				CCLabelAtlas *goldLabel;
				CCSprite *levelUpButton;
				CCSprite *scaleBig;
				CCSprite *scaleSmall;
			};
		}
	}
}

#endif //__UILAYER_H__
